package com.mxfcode.bbs_back.bbs_yhgl.controller;

import com.mxfcode.bbs_back.bbs_yhgl.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @类名 UserController
 * @描述 TODO
 * @作者 mxf
 * @创建日期 2020/10/27 10:42
 **/
@RestController
@RequestMapping(value = "/project")
public class UserController {
    private static final Logger logger= LoggerFactory.getLogger(UserController.class);
    @Autowired
    UserService userService;

    @ResponseBody
    @GetMapping(value = "/test")
    public Map<String,Object> test(){
        return userService.getOneData("1");

    }

    @GetMapping(value = "user")
    public Map<String,Object> getOneData(){
       return null;
    }

    @GetMapping(value = "userList")
    public List<Map<String, Object>> getDataList(){
        return null;
    }

    @GetMapping(value = "insert")
    public void  insertOneData(){

    }

    @GetMapping(value = "update")
    public void updateOneData(){

    }

    @GetMapping(value = "delete")
    public void deleteOneData(){

    }

    @GetMapping(value = "insertMore")
    public void insertDataForList(){

    }

    @GetMapping(value = "listData")
    public void getListData(){
        logger.error("springboot集成logger日志成功了！");
    }

}
